<%--
  Created by IntelliJ IDEA.
  User: Brill
  Date: 2016/12/4
  Time: 15:12
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>显示所有菜品</title>
  </head>
  <style type="text/css">
    table td{
      text-align: center;
    }

    table{
      border-collapse: collapse;
    }
  </style>
  <body>
  <center><h3>查询所有菜品</h3></center>
  <table align="center" border="1" width="50%">
    <tr>
      <th>编号</th>
      <th>名字</th>
      <th>菜系</th>
      <th>价格</th>
    </tr>
    <c:if test="${!empty foods}">
      <c:forEach items="${foods}" var="food">
        <tr>
          <td><c:out value="${food.id}"></c:out> </td>
          <td><c:out value="${food.foodName}"></c:out> </td>
          <td><c:out value="${food.foodType_id}"></c:out> </td>
          <td><c:out value="${food.price}"></c:out> </td>
        </tr>
      </c:forEach>
    </c:if>
  </table>
  </body>
</html>
